<?php

namespace Database\Factories;

use App\Models\Article;
use Illuminate\Database\Eloquent\Factories\Factory;

class ArticleFactory extends Factory
{
    /**
     * The name of the factory's corresponding model.
     *
     * @var string
     */
    protected $model = Article::class;

    /**
     * Define the model's default state.
     *
     * @return array
     */
    public function definition()
    {
        return [

            'category_id' => $this->faker->numberBetween(1, 50),
            'admin_id' => 10,
            'product_id' => $this->faker->numberBetween(0, 20),
            'mer_id' => $this->faker->randomElement([0, 1]),
            'title' => $this->faker->text(5),
            'author' => $this->faker->text(10),
            'image_input' => 'https://placeimg.com/640/480/any',
            'synopsis' => $this->faker->text(50),
            'share_title' => $this->faker->text(50),
            'share_synopsis' => $this->faker->text(50),
            'content' => $this->faker->text(50),
            'visit' => $this->faker->randomNumber(3, true),
            'sort' => $this->faker->randomNumber(3, true),
            'status' => $this->faker->randomElement([0, 1]),
            'url' => 'https://blog.xuanhua888.com',
            'is_hide' => $this->faker->randomElement([0, 1]),
            'is_hot' => $this->faker->randomElement([0, 1]),
            'is_banner' => $this->faker->randomElement([0, 1]),
            'system_admin_id' => $this->faker->randomElement([0, 1]),
            'created_at' => $this->faker->time('Y-m-d H:i:s', 'now'),
            'updated_at' => $this->faker->time('Y-m-d H:i:s', 'now'),
            'deleted_at' => null,
        ];
    }
}
